/**
 * @file
 * Generic theme-independent base styles.
 */

/**
 * Autocomplete.
 *
 * @see autocomplete.js
 */

/* Animated throbber */
.js input.form-autocomplete {
  background-image: url(../../../misc/throbber-inactive.png);
  background-position: 100% center; /* LTR */
  background-repeat: no-repeat;
}
.js[dir="rtl"] input.form-autocomplete {
  background-position: 0% center;
}
.js input.form-autocomplete.ui-autocomplete-loading {
  background-image: url(../../../misc/throbber-active.gif);
  background-position: 100% center; /* LTR */
}
.js[dir="rtl"] input.form-autocomplete.ui-autocomplete-loading {
  background-position: 0% center;
}

/**
 * Unboxed fieldsets for grouping form elements.
 */
.fieldgroup {
  border-width: 0;
  padding: 0;
}

/**
 * Collapsible details.
 *
 * @see collapse.js
 */
.js details:not([open]) .details-wrapper {
  display: none;
}

/**
 * Resizable textareas.
 */
.form-textarea-wrapper textarea {
  display: block;
  margin: 0;
  width: 100%;
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}
.resize-none {
  resize: none;
}
.resize-vertical {
  resize: vertical;
  min-height: 2em;
}
.resize-horizontal {
  resize: horizontal;
  max-width: 100%;
}
.resize-both {
  resize: both;
  max-width: 100%;
  min-height: 2em;
}

/**
 * TableDrag behavior.
 *
 * @see tabledrag.js
 */
body.drag {
  cursor: move;
}
tr.region-title {
  font-weight: bold;
}
tr.region-message {
  color: #999;
}
tr.region-populated {
  display: none;
}
tr.add-new .tabledrag-changed {
  display: none;
}
.draggable a.tabledrag-handle {
  cursor: move;
  float: left; /* LTR */
  height: 1.7em;
  margin-left: -1em; /* LTR */
  overflow: hidden;
  text-decoration: none;
}
[dir="rtl"] .draggable a.tabledrag-handle {
  float: right;
  margin-right: -1em;
  margin-left: 0;
}
a.tabledrag-handle:hover {
  text-decoration: none;
}
a.tabledrag-handle .handle {
  background: url(../../../misc/icons/787878/move.svg) no-repeat 6px 7px;
  height: 14px;
  margin: -0.4em 0.5em 0;
  padding: 0.42em 0.5em;
  width: 14px;
}
a.tabledrag-handle:hover .handle,
a.tabledrag-handle:focus .handle {
  background-image: url(../../../misc/icons/000000/move.svg);
}
.touch .draggable td {
  padding: 0 10px;
}
.touch .draggable .menu-item__link {
  display: inline-block;
  padding: 10px 0;
}
.touch a.tabledrag-handle {
  height: 44px;
  width: 40px;
}
.touch a.tabledrag-handle .handle {
  background-position: 40% 19px;
  height: 21px;
}
.touch .draggable.drag a.tabledrag-handle .handle {
  background-position: 50% -32px;
}
div.indentation {
  float: left; /* LTR */
  height: 1.7em;
  margin: -0.4em 0.2em -0.4em -0.4em; /* LTR */
  padding: 0.42em 0 0.42em 0.6em; /* LTR */
  width: 20px;
}
[dir="rtl"] div.indentation {
  float: right;
  margin: -0.4em -0.4em -0.4em 0.2em;
  padding: 0.42em 0.6em 0.42em 0;
}
div.tree-child {
  background: url(../../../misc/tree.png) no-repeat 11px center; /* LTR */
}
div.tree-child-last {
  background: url(../../../misc/tree-bottom.png) no-repeat 11px center; /* LTR */
}
[dir="rtl"] div.tree-child,
[dir="rtl"] div.tree-child-last {
  background-position: -65px center;
}
div.tree-child-horizontal {
  background: url(../../../misc/tree.png) no-repeat -11px center;
}
.tabledrag-toggle-weight-wrapper {
  text-align: right; /* LTR */
}
[dir="rtl"] .tabledrag-toggle-weight-wrapper {
  text-align: left;
}

/**
 * TableHeader behavior.
 *
 * @see tableheader.js
 */
table.sticky-header {
  background-color: #fff;
  margin-top: 0;
  z-index: 500;
}

/**
 * Progress behavior.
 *
 * @see progress.js
 */
.progress {
  position: relative;
}
.progress__track {
  background-color: #fff;
  border: 1px solid;
  margin-top: 5px;
  max-width: 100%;
  min-width: 100px;
  height: 16px;
}
.progress__bar {
  background-color: #000;
  height: 1.5em;
  min-width: 3%;
  max-width: 100%;
}
.progress__description,
.progress__percentage {
  color: #555;
  overflow: hidden;
  font-size: .875em;
  margin-top: 0.2em;
}
.progress__description {
  float: left; /* LTR */
}
[dir="rtl"] .progress__description {
  float: right;
}
.progress__percentage {
  float: right; /* LTR */
}
[dir="rtl"] .progress__percentage {
  float: left;
}
.progress--small .progress__track {
  height: 7px;
}
.progress--small .progress__bar {
  height: 7px;
  background-size: 20px 20px;
}

/* Throbber */
.ajax-progress {
  display: inline-block;
  padding: 1px 5px 2px 5px;
}
[dir="rtl"] .ajax-progress {
  float: right;
}
.ajax-progress-throbber .throbber {
  background: transparent url(../../../misc/throbber-active.gif) no-repeat 0px center;
  display: inline;
  padding: 1px 5px 2px;
}
.ajax-progress-throbber .message {
  display: inline;
  padding: 1px 5px 2px;
}
tr .ajax-progress-throbber .throbber {
  margin: 0 2px;
}
.ajax-progress-bar {
  width: 16em;
}

/* Full screen  throbber */
.ajax-progress-fullscreen {
  /* Can't do center:50% middle: 50%, so approximate it for a typical window size. */
  left: 49%;
  position: fixed;
  top: 48.5%;
  z-index: 1000;
  background-color: #232323;
  background-image: url("../../../misc/loading-small.gif");
  background-position: center center;
  background-repeat: no-repeat;
  border-radius: 7px;
  height: 24px;
  opacity: 0.9;
  padding: 4px;
  width: 24px;
}

/**
 * Inline items.
 */
.container-inline div,
.container-inline label {
  display: inline;
}
/* Details contents always need to be rendered as block. */
.container-inline .details-wrapper {
  display: block;
}

/**
 * Prevent text wrapping.
 */
.nowrap {
  white-space: nowrap;
}

/**
 * For anything you want to hide on page load when JS is enabled, so
 * that you can use the JS to control visibility and avoid flicker.
 */
.js .js-hide {
  display: none;
}

/**
 * For anything you want to show on page load only when JS is enabled.
 */
.js-show {
  display: none;
}
.js .js-show {
  display: block;
}

/**
 * Hide elements from all users.
 *
 * Used for elements which should not be immediately displayed to any user. An
 * example would be collapsible details that will be expanded with a click
 * from a user. The effect of this class can be toggled with the jQuery show()
 * and hide() functions.
 */
.hidden {
  display: none;
}

/**
 * Hide elements visually, but keep them available for screen readers.
 *
 * Used for information required for screen reader users to understand and use
 * the site where visual display is undesirable. Information provided in this
 * manner should be kept concise, to avoid unnecessary burden on the user.
 * "!important" is used to prevent unintentional overrides.
 */
.visually-hidden {
  position: absolute !important;
  clip: rect(1px, 1px, 1px, 1px);
  overflow: hidden;
  height: 1px;
  width: 1px;
  word-wrap: normal;
}

/**
 * The .focusable class extends the .visually-hidden class to allow
 * the element to be focusable when navigated to via the keyboard.
 */
.visually-hidden.focusable:active,
.visually-hidden.focusable:focus {
  position: static !important;
  clip: auto;
  overflow: visible;
  height: auto;
  width: auto;
}

/**
 * Hide visually and from screen readers, but maintain layout.
 */
.invisible {
  visibility: hidden;
}

/**
 * Float clearing.
 *
 * Based on the micro clearfix hack by Nicolas Gallagher, with the :before
 * pseudo selector removed to allow normal top margin collapse.
 *
 * @see http://nicolasgallagher.com/micro-clearfix-hack
 */
.clearfix:after {
  content: "";
  display: table;
  clear: both;
}

/**
 * Text alignment classes.
 */
.text-align-left {
  text-align: left;
}
.text-align-right {
  text-align: right;
}
.text-align-center {
  text-align: center;
}
.text-align-justify {
  text-align: justify;
}

/**
 * Alignment classes (images, videos, blockquotes …).
 */
.align-left {
  float: left;
}
.align-right {
  float: right;
}
.align-center {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/*
 * Remove browser styles, especially for <buttons> and so on.
 */
.reset-appearance {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  border: 0 none;
  background: transparent;
  padding: 0;
  margin: 0;
  line-height: inherit;
}

/*
 * Contain positioned elements.
 */
.position-container {
  position: relative;
}
